#include <iostream>
#include <string>
#include <cctype>
using namespace std;

int main()
{
	string s;
	cin >> s;
//	for (char &c : s)
	for (auto &c : s)
	{
		c = 'X';
	}
	cout << s << endl;

	string s1;
	string result;
	cin >> s1;
	for (auto c : s1)
	{
		if (!ispunct(c))
		{
			result += c;
		}
	}
	cout << result << endl;
	system("pause");
	return 0;
}